package com.wangshang.general.order.po;

/**
 * AbstractOrderCommoditiesId entity provides the base persistence definition of
 * the OrderCommoditiesId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public abstract class AbstractOrderCommoditiesId implements
		java.io.Serializable {

	// Fields

	private String shopOrderId;
	private String commoditiesMainId;

	// Constructors

	/** default constructor */
	public AbstractOrderCommoditiesId() {
	}

	/** full constructor */
	public AbstractOrderCommoditiesId(String shopOrderId,
			String commoditiesMainId) {
		this.shopOrderId = shopOrderId;
		this.commoditiesMainId = commoditiesMainId;
	}

	// Property accessors

	public String getShopOrderId() {
		return this.shopOrderId;
	}

	public void setShopOrderId(String shopOrderId) {
		this.shopOrderId = shopOrderId;
	}

	public String getCommoditiesMainId() {
		return this.commoditiesMainId;
	}

	public void setCommoditiesMainId(String commoditiesMainId) {
		this.commoditiesMainId = commoditiesMainId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof AbstractOrderCommoditiesId))
			return false;
		AbstractOrderCommoditiesId castOther = (AbstractOrderCommoditiesId) other;

		return ((this.getShopOrderId() == castOther.getShopOrderId()) || (this
				.getShopOrderId() != null
				&& castOther.getShopOrderId() != null && this.getShopOrderId()
				.equals(castOther.getShopOrderId())))
				&& ((this.getCommoditiesMainId() == castOther
						.getCommoditiesMainId()) || (this
						.getCommoditiesMainId() != null
						&& castOther.getCommoditiesMainId() != null && this
						.getCommoditiesMainId().equals(
								castOther.getCommoditiesMainId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getShopOrderId() == null ? 0 : this.getShopOrderId()
						.hashCode());
		result = 37
				* result
				+ (getCommoditiesMainId() == null ? 0 : this
						.getCommoditiesMainId().hashCode());
		return result;
	}

}